<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>会员列表</title>
<meta name="description" content="这是一个 index 页面">
<meta name="keywords" content="index">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="icon" type="image/png" href="../assets/i/favicon.png">
<link rel="aFple-touch-icon-precomposed"
	href="../assets/i/app-icon72x72@2x.png">
<meta name="apple-mobile-web-app-title" content="Amaze UI" />
<link rel="stylesheet" href="../assets/css/amazeui.min.css" />
<link rel="stylesheet" href="../assets/css/admin.css">
<link rel="stylesheet" href="../static/js/layui/css/layui.css" media="all">

</head>
<body>
	<!--[if lte IE 9]><p class="browsehappy">升级你的浏览器吧！ <a href="http://se.360.cn/" target="_blank">升级浏览器</a>以获得更好的体验！</p>
<![endif]-->
</head>


<body>
	<div>
		<br>
		<h3 class="am-popup-title" align="center">添加电影</h3>

		<form class="am-form tjlanmu" id="myform" name="myform" action="/moviesMaven/moviesDetail/saveMovies.htm" method="get">
			<div class="am-form-group am-cf">
				<div class="zuo">电影名称：</div>
				<div class="you">
					<input type="text" name="movieName" class="am-input-sm"
						placeholder="请输入电影名" value="">
				</div>
			</div>
			<div class="am-form-group am-cf">
				<div class="zuo">电影类型：</div>
				<div class="you" id="movieType">
					<label class="am-checkbox-inline"> <input
						name="movieTypeId" type="radio" value="1">喜剧</label> 
					<label class="am-checkbox-inline"> <input
						name="movieTypeId" type="radio" value="2">动作</label>
					<label class="am-checkbox-inline"> <input
						name="movieTypeId" type="radio" value="3">爱情</label>
					<label class="am-checkbox-inline"> <input
						name="movieTypeId" type="radio" value="4">动画</label>
					<label class="am-checkbox-inline"> <input
						name="movieTypeId" type="radio" value="5">奇幻</label>
				</div>
			</div>
			<div class="am-form-group am-cf">
				<div class="zuo">电影状态：</div>
				<div class="you" id="movieStatus">
					<label class="am-checkbox-inline"> <input
						name="movieIsActiveId" type="radio" value="1">选座购票</label> 
					<label class="am-checkbox-inline"> <input
						name="movieIsActiveId" type="radio" value="2">即将上映</label>
					<label class="am-checkbox-inline"> <input
						name="movieIsActiveId" type="radio" value="3">停映</label>
				</div>
			</div>
			<div class="am-form-group am-cf">
				<div class="zuo">主演：</div>
				<div class="you">
					<input type="text" name="protagonist" class="am-input-sm"
						placeholder="请输入主演" value="">
				</div>
			</div>
			<div class="am-form-group am-cf">
				<div class="zuo">导演：</div>
				<div class="you">
					<input type="text" name="director" class="am-input-sm"
						placeholder="请输入导演名" value="">
				</div>
			</div>
			<div class="am-form-group am-cf">
				<div class="zuo">电影时长：</div>
				<div class="you">
					<input type="number" name="duration" class="am-input-sm"
						placeholder="请输入电影时长" value="">
				</div>
			</div>
			<div class="am-form-group am-cf">
				<div class="zuo">剧情描述：</div>
				<div class="you">
					<input type="text" name="description" class="am-input-sm"
						placeholder="请输入剧情描述" value="">
				</div>
			</div>
			
			<div class="am-form-group am-cf">
				<div class="zuo">上映时间：</div>
				<div class="you">
					<input type="datetime" name="releaseDate" class="am-input-sm"
						placeholder="请输入上映时间" value="">
				</div>
			</div>

			<div class="am-form-group am-cf">
				<div class="zuo">国家地区：</div>
				<div class="you">
					<input type="text" name="state" class="am-input-sm"
						placeholder="请输入国家地区" value="">
				</div>
			</div>
			<div class="am-form-group am-cf">
				<div class="zuo">发行公司：</div>
				<div class="you">
					<input type="text" name="issuingCompany" class="am-input-sm"
						placeholder="请输入发行公司" value="">
				</div>
			</div>
			<div class="am-form-group am-cf">
				<div class="zuo">图片路径：</div>
				<div class="you">
					<input type="text" id="picPath" name="poster" class="am-input-sm" value="">
				</div>
			</div>
			<div class="am-form-group am-cf" align="center">
				<img id="img_current" src="" class="mytime_user_photo" />
				<button type="button" class="layui-btn" id="test1">
	  				<i class="layui-icon">&#xe67c;</i>上传图片
				</button>
			</div>
			<div class="am-form-group am-cf" align="right">
				<div class="you">
					<p>
						<!-- <input type="button" id="createBy" value="提交"> -->
						<input type="submit" value="提交">
					</p>
				</div>
			</div>
		</form>


	</div>
	<script type="text/javascript" src="../assets/js/jquery-1.8.3.min.js"></script>
	<script type="text/javascript">
		$(function() {
			insertPic();
			check(); 
			sumbitTest();
		});
		function insertPic(){
			var url;
			layui.use('upload', function(){
			  var $ = layui.jquery
			  ,upload = layui.upload;
			  
			  //普通图片上传
			  var uploadInst = upload.render({
			    elem: '#test1'
			    ,url: '/moviesMaven/user/upload.htm'
			    ,before: function(obj){
			      //预读本地文件示例，不支持ie8
			      obj.preview(function(index, file, result){
			        $('#img_current').attr('src', result); //图片链接（base64）
			      });
			    }
			    ,done: function(res){
			      //如果上传失败
			      if(res.code > 0){
			        return layer.msg('上传失败');
			      }
			      //获取图片存储的路径
			      $("#picPath").val(res.file);
			    }
			    ,error: function(){
			      //演示失败状态，并实现重传
			      var demoText = $('#demoText');
			      demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
			      demoText.find('.demo-reload').on('click', function(){
			        uploadInst.upload();
			      });
			    }
			  });
			});
			
		}
	</script>
</body>
</html>